﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentValidation.Results;
using SharpArch.Core.CommonValidator;

namespace Peak.Web.Controllers.Models
{
  public class PeakValidationResult : IValidationResult
  {
    public object AttemptedValue{ get; set;}

    public Type ClassContext{ get; set;}

    public string Message{ get; set;}

    public string PropertyName{ get; set;} 
   
    public PeakValidationResult(ValidationFailure failure, Type classContext)
    {
      AttemptedValue = failure.AttemptedValue;
      Message = failure.ErrorMessage;
      PropertyName = failure.PropertyName;
      ClassContext = classContext;
    }
  }
}
